package com.ssky.bean.validator.core;

import com.ssky.bean.validator.core.BaseValidatorContext;
import com.ssky.bean.validator.core.IValidatorContext;
import com.ssky.bean.validator.core.ValueExp;

/**
 * @Author: ssky
 * @Date: 2021/07/25
 * @Description: field取值处理器
 */
public interface IFieldValueGetHandler {

    /**
     * 获取当前属性的子属性的值
     *
     * @param thisFeldName
     * @param thisObj      属性的所属对象
     * @return
     */
    Object getThisFv(String thisFeldName, Object thisObj);

    /**
     * 获取当前属性所属对象的子属性值
     *
     * @param localFieldName
     * @param localObj       属性的所属对象
     * @return
     */
    Object getLocalFv(String localFieldName, Object localObj);

    /**
     * 获取属性的值
     *
     * @param fullFieldName 属性路径
     * @param bean          属性所属最外层对象
     * @return
     */
    Object getFfv(String fullFieldName, Object bean);

    Object getExpVaule(ValueExp valueExp, Object v, Object l, Object b, IValidatorContext context);
}
